home *** CD-ROM | disk | FTP | other *** search
/ Star Festival... a Return to Japan / Star Festival... a Return to Japan.iso / pc / STARFESTIVAL / Shared.Cst / 00155_scrollMech & clockWait.ls < prev    next >
Encoding:
Text File  |  1999-10-10  |  9.1 KB  |  358 lines

  1. on scrollMechOne theDir
  2.   global gCurrentLocation, gSearchFlag
  3.   set castNo = gCurrentLocation
  4.   set channel = the clickOn
  5.   
  6.   puppetSound "buttonSound"
  7.   
  8.   puppetsprite 11, true
  9.   puppetsprite 12, true
  10.   puppetsprite 17, true
  11.   puppetsprite 29, true
  12.   
  13.   if theDir = 1 then 
  14.     set the castNum of sprite 11 to the number of member "upB"
  15.     set castNo = castNo + 1
  16.   else
  17.     set the castNum of sprite 12 to the number of member "downB"
  18.     set castNo = castNo - 1
  19.   end if
  20.   
  21.   if castNo < 1 then set castNo = 1
  22.   
  23.   if gSearchFlag = 1 then
  24.     if castNo > 20 then
  25.       set castNo = 20
  26.     end if
  27.   else
  28.     
  29.     -- Kludge to remove wierdness, first half
  30.     set the puppet of sprite 6 = TRUE
  31.     if castNo > 20 then set castNo = 20
  32.   end if
  33.   
  34.   set the castNum of sprite 29 = (the number of cast ("site" & castNo))
  35.   
  36.   set the castNum of sprite 38 = (the number of cast ("time" & castNo))
  37.   
  38.   updateStage
  39.   
  40.   clockWait 1
  41.   
  42.   repeat while the mouseDown
  43.     
  44.     set currentCastName = the name of cast the mouseCast
  45.     if currentCastName contains "down" or currentCastName contains "up" then
  46.       
  47.       set theV = the mouseV
  48.       
  49.       if theV < 263 then
  50.         set castNo = castNo + 1
  51.         set the castNum of sprite 11 to the number of member "upB"
  52.         set the castNum of sprite 12 to the number of member "down"
  53.       else if theV > 275 then
  54.         set the castNum of sprite 11 to the number of member "up"
  55.         set the castNum of sprite 12 to the number of member "downB"
  56.         set castNo = castNo - 1
  57.       else if theV > 262 and theV < 276 then
  58.         set the castNum of sprite 11 to the number of member "up"
  59.         set the castNum of sprite 12 to the number of member "down"
  60.       end if
  61.       set the locH of sprite 44 = the mouseH
  62.       set the locV of sprite 44 = the mouseV
  63.       updateStage
  64.       
  65.       if castNo < 1 then set castNo = 1
  66.       
  67.       if gSearchFlag = 1 then
  68.         if castNo > 20 then
  69.           set castNo = 20
  70.         end if
  71.       else
  72.         if castNo > 20 then set castNo = 20
  73.       end if
  74.       
  75.       set the castNum of sprite 29 = (the number of cast ("site" & castNo))
  76.       
  77.       set the castNum of sprite 38 = (the number of cast ("time" & castNo))
  78.       
  79.       updateStage
  80.       
  81.       clockWait 1
  82.       
  83.     else
  84.       set the castNum of sprite 11 to the number of member "up"
  85.       set the castNum of sprite 12 to the number of member "down"
  86.       updateStage
  87.       exit
  88.     end if
  89.   end repeat
  90.   
  91.   set the castNum of sprite 11 to the number of member "up"
  92.   set the castNum of sprite 12 to the number of member "down"
  93.   updateStage
  94.   
  95.   puppetsprite 11, false
  96.   puppetsprite 12, false
  97.   
  98.   if castNo <> gCurrentLocation then
  99.     put  (the castNum of sprite 29) + 20
  100.     set the castNum of sprite 29 = (the castNum of sprite 29) + 20
  101.     
  102.     --puppetSound "scrollLO"
  103.     doVoxLikeScroll
  104.     updateStage
  105.     
  106.     puppetsprite 38,false
  107.     
  108.     go "xit"
  109.     updateStage
  110.     
  111.     -- Kludge to remove wierdness, second half
  112.     set the puppet of sprite 6 = FALSE
  113.     
  114.     if gSearchFlag = 1 then
  115.       set gSearchFlag = 0
  116.       if castNo < 10 then
  117.         go to frame "sch" of movie "0" & string(castNo) & "r"
  118.       else
  119.         go to frame "sch" of movie string(castNo) & "r"
  120.       end if
  121.     else
  122.       if castNo < 10 then
  123.         go to frame "a" of movie "0" & string(castNo) & "r"
  124.       else
  125.         go to frame "a" of movie string(castNo) & "r"
  126.       end if
  127.     end if
  128.     
  129.   end if
  130.   
  131.   -- We might as well kill two birds with one stone.  The clicking can not
  132.   -- be corrupted by puppetSounds in channel 1, and we should probably cancel
  133.   -- any "vox" audio, so we will treat the clicking as a pseudo-vox.  i.e., 
  134.   -- asynchronous sound that occupies a different sound channel.
  135.   --puppetSound (0)
  136.   --doVoxLikeScroll
  137.   
  138. end
  139. --
  140.  
  141. on scrollMechTwo theDir
  142.   global gCurrentLocation, gSearchFlag
  143.   set castNo = gCurrentLocation
  144.   set channel = the clickOn
  145.   
  146.   puppetSound "buttonSound"
  147.   
  148.   puppetsprite 9, true
  149.   puppetsprite 10, true
  150.   puppetsprite 17, true
  151.   puppetsprite 29, true
  152.   
  153.   if gSearchFlag = 1 then
  154.     
  155.     if theDir = 1 then
  156.       set the castNum of sprite 9 to the number of member "leftB"
  157.       set castNo = castNo - 1
  158.     else
  159.       set the castNum of sprite 10 to the number of member "rightB"
  160.       set castNo = castNo + 1
  161.     end if
  162.   else
  163.     if theDir = 1 then
  164.       set the castNum of sprite 9 to the number of member "leftB"
  165.       if castNo = 20 then
  166.         set castNo = 19
  167.       else if castNo > 17 then
  168.         set castNo = 17
  169.       else if castNo > 9 then
  170.         set castNo = 9
  171.       else if castNo > 1 then 
  172.         set castNo = 1
  173.         
  174.       end if
  175.     else
  176.       set the castNum of sprite 10 to the number of member "rightB"
  177.       if castNo < 9 then
  178.         set castNo = 9
  179.       else if castNo < 17 then
  180.         set castNo = 17
  181.       else if castNo < 19 then
  182.         set castNo = 19
  183.       else if castNo = 19 then 
  184.         set castNo = 20
  185.       end if
  186.     end if
  187.   end if
  188.   
  189.   if castNo < 1 then set castNo = 1
  190.   
  191.   if gSearchFlag = 1 then
  192.     if castNo > 20 then
  193.       set castNo = 20
  194.     end if
  195.   else
  196.     
  197.     -- Kludge to remove wierdness, first half
  198.     set the puppet of sprite 6 = TRUE
  199.     if castNo > 20 then set castNo = 20
  200.   end if
  201.   
  202.   set the castNum of sprite 29 = (the number of cast ("site" & castNo))
  203.   set the castNum of sprite 38 = (the number of cast ("time" & castNo))
  204.   
  205.   if gSearchFlag = 1 then
  206.     set the castNum of sprite 30 = (the number of cast ("search" & castNo))
  207.   end if
  208.   updateStage
  209.   
  210.   if gSearchFlag = 1 then
  211.     clockWait 3
  212.   else
  213.     clockWait 1
  214.   end if
  215.   
  216.   repeat while the mouseDown
  217.     
  218.     set currentCastName = the name of cast the mouseCast
  219.     
  220.     if currentCastName contains "left" or currentCastName contains "right" then
  221.       
  222.       set theH = the mouseH
  223.       set theV = the mouseV
  224.       
  225.       if theH < 62 then
  226.         set the castNum of sprite 9 to the number of member "leftB"
  227.         set the castNum of sprite 10 to the number of member "right"
  228.         if gSearchFlag = 1 then
  229.           set castNo = castNo - 1
  230.         else
  231.           if castNo = 20 then
  232.             set castNo = 19
  233.           else if castNo > 17 then
  234.             set castNo = 17
  235.           else if castNo > 9 then
  236.             set castNo = 9
  237.           else if castNo > 1 then 
  238.             set castNo = 1
  239.           end if
  240.         end if
  241.       else if theH > 69 then
  242.         set the castNum of sprite 9 to the number of member "left"
  243.         set the castNum of sprite 10 to the number of member "rightB"
  244.         if gSearchFlag = 1 then
  245.           set castNo = castNo + 1
  246.         else
  247.           if castNo < 9 then
  248.             set castNo = 9
  249.           else if castNo < 17 then
  250.             set castNo = 17
  251.           else if castNo < 19 then
  252.             set castNo = 19
  253.           else if castNo = 19 then 
  254.             set castNo = 20
  255.           end if
  256.         end if
  257.       else if theH > 62 and theV < 69 then
  258.         set the castNum of sprite 9 to the number of member "left"
  259.         set the castNum of sprite 10 to the number of member "right"
  260.       end if
  261.       updateStage
  262.       
  263.       if castNo < 1 then set castNo = 1
  264.       
  265.       if gSearchFlag = 1 then
  266.         if castNo > 20 then
  267.           set castNo = 20
  268.         end if
  269.       else
  270.         if castNo > 20 then set castNo = 20
  271.       end if
  272.       
  273.       set the castNum of sprite 29 = (the number of cast ("site" & castNo))
  274.       set the castNum of sprite 38 = (the number of cast ("time" & castNo))
  275.       if gSearchFlag = 1 then
  276.         set the castNum of sprite 30 = (the number of cast ("search" & castNo))
  277.       end if
  278.       updateStage
  279.       
  280.       if gSearchFlag = 1 then
  281.         clockWait 3
  282.       else
  283.         clockWait 2
  284.       end if
  285.       
  286.     else
  287.       nothing 
  288.     end if
  289.   end repeat
  290.   
  291.   set the castNum of sprite 9 to the number of member "left"
  292.   set the castNum of sprite 10 to the number of member "right"
  293.   updateStage
  294.   
  295.   puppetsprite 9, false
  296.   puppetsprite 10, false
  297.   
  298.   if castNo <> gCurrentLocation then
  299.     
  300.     set the castNum of sprite 29 = (the castNum of sprite 29 + 20)
  301.     
  302.     -- We might as well kill two birds with one stone.  The clicking can not
  303.     -- be corrupted by puppetSounds in channel 1, and we should probably cancel
  304.     -- any "vox" audio, so we will treat the clicking as a pseudo-vox.  i.e., 
  305.     -- asynchronous sound that occupies a different sound channel.
  306.     --puppetSound (0)
  307.     doVoxLikeScroll
  308.     --puppetSound "scrollLO"
  309.     
  310.     updateStage
  311.     
  312.     puppetsprite 38,false
  313.     
  314.     go "xit"
  315.     
  316.     updateStage
  317.     -- Kludge to remove wierdness, second half
  318.     set the puppet of sprite 6 = FALSE
  319.     
  320.     if gSearchFlag = 1 then
  321.       set gSearchFlag = 0
  322.       if castNo < 10 then
  323.         go to frame "sch" of movie "0" & string(castNo) & "r"
  324.       else
  325.         go to frame "sch" of movie string(castNo) & "r"
  326.       end if
  327.     else
  328.       if castNo < 10 then
  329.         go to frame "a" of movie "0" & string(castNo) & "r"
  330.       else
  331.         go to frame "a" of movie string(castNo) & "r"
  332.       end if
  333.     end if
  334.     
  335.   end if
  336.   
  337.   --puppetSound (0)
  338.   --doVoxLikeScroll
  339.   
  340. end
  341. --
  342.  
  343. on scrollMech
  344.   nothing
  345. end
  346.  
  347. -------- 
  348.  
  349. on clockWait theCount
  350.   startTimer
  351.   repeat while the timer < (theCount * 30)
  352.     set the locH of sprite 44 = the mouseH
  353.     set the locV of sprite 44 = the mouseV
  354.     updateStage
  355.   end repeat
  356. end
  357. --
  358.